package com.sgam.mf.domain.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.codehaus.jackson.map.annotate.JsonDeserialize;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.springframework.format.annotation.DateTimeFormat;

import com.sgam.mf.domain.ref.RefAssType;
import com.sgam.utils.CustomDateDeserializer;
import com.sgam.utils.CustomDateSerializer;

@Entity
@Table(name = "REG_PARTNERS_ASS")
public class RegPartnersAss {

		@Id
		@Column(name = "id")
		@GeneratedValue
		private Integer id;

	
		@JsonSerialize(using = CustomDateSerializer.class)
		@JsonDeserialize(using = CustomDateDeserializer.class)
		@DateTimeFormat(pattern="dd.MM.yyyy")
		@Column(name = "expiration_date") 
		private Date expirationDate;

		@ManyToOne
		@JoinColumn(name = "ass_type_fk") 
		private RefAssType refAssType;

		public Integer getId() {
			return id;
		}


		public void setId(Integer id) {
			this.id = id;
		}


		public Date getExpirationDate() {
			return expirationDate;
		}


		public void setExpirationDate(Date expirationDate) {
			this.expirationDate = expirationDate;
		}


		public RefAssType getRefAssType() {
			return refAssType;
		}


		public void setRefAssType(RefAssType refAssType) {
			this.refAssType = refAssType;
		}
		
		

	
}
